//============== IV: Multiplayer - http://code.iv-multiplayer.com ==============
//
// File: CDirectInputDevice8Proxy.h
// Project: Client.Core
// Author(s): jenksta
// License: See LICENSE in root directory
//
//==============================================================================

#pragma once

#define DIRECTINPUT_VERSION 0x0800

#include "DXSDK/Include/dinput.h"

enum eDIDeviceType
{
	DIDEVICE_TYPE_UNKNOWN,
	DIDEVICE_TYPE_MOUSE,
	DIDEVICE_TYPE_KEYBOARD,
	DIDEVICE_TYPE_JOYSTICK
};

class CDirectInputDevice8Proxy : public IDirectInputDevice8
{
private:
	IDirectInput8 * m_pDI;
	IDirectInputDevice8 * m_pDIDevice;
	eDIDeviceType m_DeviceType;

public:
	CDirectInputDevice8Proxy(IDirectInput8 * dinput, IDirectInputDevice8 * dinputdevice, eDIDeviceType DeviceType);

	/*** IUnknown methods ***/
	HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, LPVOID * ppvObj);
	ULONG STDMETHODCALLTYPE   AddRef();
	ULONG STDMETHODCALLTYPE   Release();

	/*** IDirectInputDevice8A methods ***/
	HRESULT STDMETHODCALLTYPE GetCapabilities(LPDIDEVCAPS p0);
	HRESULT STDMETHODCALLTYPE EnumObjects(LPDIENUMDEVICEOBJECTSCALLBACKA p0, LPVOID p1, DWORD p2);
	HRESULT STDMETHODCALLTYPE GetProperty(REFGUID rguid, LPDIPROPHEADER p1);
	HRESULT STDMETHODCALLTYPE SetProperty(REFGUID rguid, LPCDIPROPHEADER p1);
	HRESULT STDMETHODCALLTYPE Acquire();
	HRESULT STDMETHODCALLTYPE Unacquire();
	HRESULT STDMETHODCALLTYPE GetDeviceState(DWORD p0, LPVOID p1);
	HRESULT STDMETHODCALLTYPE GetDeviceData(DWORD p0, LPDIDEVICEOBJECTDATA p1, LPDWORD p2, DWORD p3);
	HRESULT STDMETHODCALLTYPE SetDataFormat(LPCDIDATAFORMAT p0);
	HRESULT STDMETHODCALLTYPE SetEventNotification(HANDLE p0);
	HRESULT STDMETHODCALLTYPE SetCooperativeLevel(HWND p0, DWORD p1);
	HRESULT STDMETHODCALLTYPE GetObjectInfo(LPDIDEVICEOBJECTINSTANCEA p0, DWORD p1, DWORD p2);
	HRESULT STDMETHODCALLTYPE GetDeviceInfo(LPDIDEVICEINSTANCEA p0);
	HRESULT STDMETHODCALLTYPE RunControlPanel(HWND p0, DWORD p1);
	HRESULT STDMETHODCALLTYPE Initialize(HINSTANCE p0, DWORD p1, REFGUID rguid);
	HRESULT STDMETHODCALLTYPE CreateEffect(REFGUID rguid, LPCDIEFFECT p1, LPDIRECTINPUTEFFECT * p2, LPUNKNOWN p3);
	HRESULT STDMETHODCALLTYPE EnumEffects(LPDIENUMEFFECTSCALLBACKA p0, LPVOID p1, DWORD p2);
	HRESULT STDMETHODCALLTYPE GetEffectInfo(LPDIEFFECTINFOA p0, REFGUID rguid);
	HRESULT STDMETHODCALLTYPE GetForceFeedbackState(LPDWORD p0);
	HRESULT STDMETHODCALLTYPE SendForceFeedbackCommand(DWORD p0);
	HRESULT STDMETHODCALLTYPE EnumCreatedEffectObjects(LPDIENUMCREATEDEFFECTOBJECTSCALLBACK p0, LPVOID p1, DWORD p2);
	HRESULT STDMETHODCALLTYPE Escape(LPDIEFFESCAPE p0);
	HRESULT STDMETHODCALLTYPE Poll();
	HRESULT STDMETHODCALLTYPE SendDeviceData(DWORD p0, LPCDIDEVICEOBJECTDATA p1, LPDWORD p2, DWORD p3);
	HRESULT STDMETHODCALLTYPE EnumEffectsInFile(LPCSTR p0, LPDIENUMEFFECTSINFILECALLBACK p1, LPVOID p2, DWORD p3);
	HRESULT STDMETHODCALLTYPE WriteEffectToFile(LPCSTR p0, DWORD p2, LPDIFILEEFFECT p3, DWORD p4);
	HRESULT STDMETHODCALLTYPE BuildActionMap(LPDIACTIONFORMATA p0, LPCSTR p1, DWORD p2);
	HRESULT STDMETHODCALLTYPE SetActionMap(LPDIACTIONFORMATA p0, LPCSTR p1, DWORD p2);
	HRESULT STDMETHODCALLTYPE GetImageInfo(LPDIDEVICEIMAGEINFOHEADERA p0);
};
